// 指标开发
import { RouteRecordRaw } from 'vue-router';
import * as RouteNames from '../consts';
const routes: RouteRecordRaw[] = [
  {
    path: '/indicator',
    component: () => import('@/layout/base-layout.vue'),
    redirect: '/indicator/develop',
    meta: { title: '指标开发' },
    children: [
      {
        path: 'develop',
        name: RouteNames.ROUTE_INDEXDEVELOP,
        component: () => import('@/views/indexDevelop/develop/index.vue'),
        meta: { title: '指标开发' }
      },
      {
        path: 'scenes',
        name: RouteNames.ROUTE_INDEXSCENESMANAGE,
        component: () => import('@/views/indexDevelop/scenesManage/index.vue'),
        meta: { title: '场景管理' }
      },
      {
        path: 'model',
        name: RouteNames.ROUTE_INDEXMODELMANAGE,
        component: () => import('@/views/indexDevelop/modelManage/index.vue'),
        meta: { title: '模型管理' }
      },
      {
        path: 'model/indexinfo/:id',
        name: RouteNames.ROUTE_INDEXMODELMANAGE_INDEXIFON,
        component: () =>
          import('@/views/indexDevelop/modelManage/info/index.vue'),
        meta: { title: '指标模型详情' }
      },
      {
        path: 'model/dimensiondetail/:id',
        name: RouteNames.ROUTE_DIMENSIONDETAIL,
        component: () =>
          import('@/views/indexDevelop/modelManage/dimensionDetail/index.vue'),
        meta: { title: '维表详情' }
      },
      {
        path: 'data',
        name: RouteNames.ROUTE_DATAMANAGE,
        component: () => import('@/views/indexDevelop/dataManage/index.vue'),
        meta: { title: '数据管理' }
      },
      {
        path: 'create-datasource',
        name: RouteNames.ROUTE_CREATEDATASOURCE,
        component: () =>
          import('@/views/indexDevelop/dataManage/datasource/index.vue'),
        meta: { title: '数据同步' }
      },
      {
        path: 'data/detail',
        name: RouteNames.ROUTER_DATAMANAGEDETAIL,
        component: () =>
          import(
            '@/views/indexDevelop/dataManage/components/tableDetail/index.vue'
          ),
        meta: { title: '表详情' }
      }
    ]
  },
  {
    path: '/indicator/table',
    name: RouteNames.ROUTER_INDICATORTABLE,
    component: () =>
      import(
        '@/views/indexDevelop/develop/components/indicatorDevelopTable/index.vue'
      ),
    meta: { title: '指标开发工作台' }
  }
];

export default routes;
